package org.dromara.business.domain.vo;

import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.business.domain.ZjFileManage;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 文件管理视图对象 zj_file_manage
 *
 * @author sky丶Happy
 * @date 2024-12-25
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = ZjFileManage.class)
public class ZjFileManageVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 名称（例如：文化手册、企业画册、VI手册等）字典
     */
    @ExcelProperty(value = "名称", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "zj_file_manage_type")
    private String type;

    /**
     * 封面（存oss表id）
     */
    @ExcelProperty(value = "封面", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "存=oss表id")
    private String cover;

    /**
     * 封面（存oss表id）Url
     */
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "cover")
    private String coverUrl;
    /**
     * 文件名称
     */
    @ExcelProperty(value = "文件名称")
    private String name;

    /**
     * 文件类型
     */
    @ExcelProperty(value = "文件类型")
    private String fileType;

    /**
     * 文件大小
     */
    @ExcelProperty(value = "文件大小")
    private String fileSize;

    /**
     * 文件地址（存oss表id）
     */
    @ExcelProperty(value = "文件地址", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "存=oss表id")
    private String filePath;

    /**
     * 显示顺序
     */
    @ExcelProperty(value = "显示顺序")
    private Long sort;

    /**
     * 状态文件是否发布（0正常 1停用）
     */
    @ExcelProperty(value = "状态文件是否发布", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "sys_normal_disable")
    private String status;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;


}
